//
//  DBParserRule.h
//  parser
//
//  Created by Daniel Braun on 26/05/07.
//  Copyright 2007 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>

#define _DBP_MAX_LA 2
@class DBParser;

@interface DBParserRule : NSObject {
	DBParserRule *nextSeq;
	int tokens[_DBP_MAX_LA];
	SEL action;
}

- (id) initWithAction:(SEL)act;

- (void) invokeWithParser:(DBParser *)p;
- (void) preProcess;
- (void) beginWithParser:(DBParser *)p;
- (void) matchedWithParser:(DBParser *)p;
- (void) matchedWithParser:(DBParser *)p consume:(BOOL)c;

- (int *) tokens;
- (void) appendTokensFrom:(DBParserRule *)r;


- (DBParserRule *) appendSeq:(DBParserRule *)r;
- (DBParserRule *) nextSeq;

- (DBParserRule *) instantiateRule;
@end
